package com.hsbc.dev.teamo4.sms.sm.dto;

import com.hsbc.dev.teamo4.sms.sm.po.Permission;
import org.springframework.beans.BeanUtils;

/**
 * @author:Kevin
 * @version:
 * @Project: permission_manage
 * @Package: com.hsbc.dev.teamo4.sms.sm.dto
 * @Description:
 * @Date date: 2018/7/29
 */
public class PermissionDto extends Permission{
    //默认是否选中
    private boolean checked=false;
    //是由有权限操作
    private boolean hasPermission=false;

    public static PermissionDto adapt(Permission permission){
        PermissionDto permissionDto=new PermissionDto();
        BeanUtils.copyProperties(permission,permissionDto);
        return permissionDto;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public boolean isHasPermission() {
        return hasPermission;
    }

    public void setHasPermission(boolean hasPermission) {
        this.hasPermission = hasPermission;
    }
}
